#ifndef ELEMENT_H_INCLUDED
#define ELEMENT_H_INCLUDED

#include "XGE_Common.h"

namespace XGE
{
    class Element
    {
        protected:
            //The Element's Name
            Ogre::String strName;
            //Has this Element been Initialized?
            bool bInit;
            //Is this Element active? On by default, should be set off if no renderable deletion fx should take place.
            bool bActive;
            //Should this Element be deleted?
            bool bDel;

        public:
            Element(const Ogre::String& nName)
            {
                strName = nName;
                bInit = false;
                bActive = true;
                bDel = false;
            };

            virtual ~Element() {};

            virtual bool _update(void) = 0;

            //Gets this Element's name
            Ogre::String getName(void) { return strName; };
            //Returns whether this Element has been initialized
            bool _initialized(void) { return bInit; };
            //Schedules this Element for deletion
            void scheduleDeletion(void) { bDel = true; };
            //TODO: Implement activation effects
            //Sets is Element's 'active' state; On to delay a deletion until it has finished final rendering fx, Off to skip final rendering fx
            void setActive(const bool& toggle) { bActive = toggle; };
            //Returns whether this Element is active
            const bool& isActive(void) { return bActive; };
    };
}

#endif // ELEMENT_H_INCLUDED
